/**CopyRight[1990-2012]<lyc2877@gmail.com>
 */
#ifndef MYIPCS_INCLUDE_PROCESSMANAGER_H_
#define MYIPCS_INCLUDE_PROCESSMANAGER_H_

#include "Common.h"
#include "MQueue.h"
#include "Worker.h"
#include "Sender.h"
void* thread(void* in_pv);

class CProcessManager {
 public:
  void process_logic(int , char**);
  void boot();
  void stop();
  bool lock(int in_nMode);
  int32_t create_thread(CThread* in_pt);
  
  CWorker* m_pworker;
  CSender* m_psender;
  CMQueue *m_pMQueue;
//*************************************************
  static CProcessManager* GetInstance();
  CProcessManager();
  ~CProcessManager();
 private:
  static CProcessManager *m_pInstance;
  int m_nLockFd;
};
#define PROCESS  CProcessManager::GetInstance()

#endif  // MYIPCS_INCLUDE_PROCESSMANAGER_H_
